<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Title</title>
</head>
<body>
<h1>我是首页</h1>


<c:out value="${message}"></c:out>

<h2>欢迎:</h2><c:out value="${user.username}"></c:out>

<a href="/add.jsp">添加</a>

<table>
    <tr>
        <th>序号</th>
        <th>名字</th>
        <th>操作</th>
    </tr>

    <c:forEach items="${books}" var="b" >
    <tr>
        <td>${b.id}</td>
        <td>${b.name}</td>
        <td><a href="/deleteServlet?id=${b.id}">删除</a><a href="/getBook?id=${b.id}">更新</a></td>
    </tr>
    </c:forEach>


</table>



</body>
</html>
